using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using BruteForceSerializer.Normalization;
using NUnit.Framework;
using TypeResolve.Loader_Net45;

namespace test.XcoAppSpaces.Core
{
	[TestFixture]
	public class testAssemblyLoader
	{
		[Test]
		public void LoadAssemblies_works_in_release_build()
		{
			//there seems to be a problem in release build with this
			var assemblies = AssemblyLoader.LoadCurrentAssemblies();
			Assert.NotNull(assemblies);
		}

		[Test]
		public void DictionaryEntry_has_setter()
		{
			var normalizer = new Normalizer();
			var test = new DictionaryEntry("key", 1);
			test.Key = "key";
			test.Value = 1;

			var no = normalizer.Normalize(test);

			var obj = (DictionaryEntry)normalizer.DeNormalize(no);

			//Assert.That(test.Key, Is.EqualTo("bla"));
			Assert.That(obj.Key, Is.EqualTo(test.Key));
			Assert.That(obj.Value, Is.EqualTo(test.Value));
		}
	}
}